const CDN_HOST = {
  cn: 'lf3-cdn-tos.bytegoofy.com',
  sg: 'sf16-scmcdn-sg.ibytedtos.com',
  maliva: 'sf16-scmcdn-va.ibytedtos.com',
  india: 'sf16-scmcdn-gcp.ibytedtos.com',
  oci: 'lf16-cdn-tos.tiktokcdn-us.com',
  ['rangers-cn']: 'lf3-cdn-tos.bytegoofy.com',
  ['rangers-private']: 'lf3-cdn-tos.bytegoofy.com',
}

const SLARDAR_WEB_CDN_HOST = {
  cn: 'lf3-short.ibytedapm.com',
  sg: 'sf16-short-sg.bytedapm.com',
  maliva: 'sf16-short-va.bytedapm.com',
  india: 'sf16-short-gcp.bytedapm.com',
  oci: 'lf16-cdn-tos.tiktokcdn-us.com',
  euttp: 'sf16-short-va.bytedapm.com',
}

const DOMAIN_HOST = {
  cn: 'mon.zijieapi.com',
  sg: 'mon-va.byteoversea.com',
  maliva: 'mon-va.byteoversea.com',
  india: 'mon-va-useast2a.byteoversea.com',
  oci: 'mon16-normal-useast5.tiktokv.us',
  euttp: 'mon-i18n.tiktokv.com',
  ['rangers-cn']: 'apmplus.volces.com',
  ['rangers-private']: '',
}

const SLARDAR_CDN_PATH = '/goofy/slardar/fe/sdk/plugins'
const RANGERS_CDN_PATH = '/goofy/appmonitor/rangers_site_sdk'
const CDN_PATH = {
  cn: SLARDAR_CDN_PATH,
  sg: SLARDAR_CDN_PATH,
  maliva: SLARDAR_CDN_PATH,
  india: SLARDAR_CDN_PATH,
  oci: '/obj/static-tx/slardar/fe/sdk/plugins',
  ['rangers-cn']: RANGERS_CDN_PATH,
  ['rangers-private']: RANGERS_CDN_PATH,
  euttp: SLARDAR_CDN_PATH,
}

const SLARDAR_LITE_CDN_PATH = '/slardar/fe/sdk_lite/plugins'
const LITE_CDN_PATH = {
  cn: SLARDAR_LITE_CDN_PATH,
  sg: SLARDAR_LITE_CDN_PATH,
  maliva: SLARDAR_LITE_CDN_PATH,
  india: SLARDAR_LITE_CDN_PATH,
  oci: '/obj/static-tx' + SLARDAR_LITE_CDN_PATH,
  euttp: SLARDAR_LITE_CDN_PATH,
}

const SLARDAR_BATCH_PATH = '/log/sentry/v2/api/slardar/batch/'
const RANGERS_BATCH_PATH = '/monitor_browser/collect'
const MINI_PROGRAM_BATCH_PATH = '/monitor_mini/collect'
const REPORT_BATCH_PATH = {
  cn: SLARDAR_BATCH_PATH,
  sg: SLARDAR_BATCH_PATH,
  maliva: SLARDAR_BATCH_PATH,
  india: SLARDAR_BATCH_PATH,
  oci: SLARDAR_BATCH_PATH,
  euttp: SLARDAR_BATCH_PATH,
  ['rangers-cn']: RANGERS_BATCH_PATH,
  ['rangers-private']: RANGERS_BATCH_PATH,
}

const SDK_DOMAIN = {
  cn: 'mon.zijieapi.com',
  sg: 'mon-va.byteoversea.com',
  maliva: 'mon-va.byteoversea.com',
  india: 'mon-va-useast2a.byteoversea.com',
  oci: 'mon16-normal-useast5.tiktokv.us',
  euttp: 'mon-i18n.tiktokv.com',
  ['rangers-cn']: 'apmplus.volces.com',
  ['rangers-private']: '',
  ['apm-mini-program-cn']: 'apmplus.volces.com',
}

const SDK_SLARDAR_BATCH_PATH = '/monitor_browser/collect/batch/'
const SDK_BATCH_PATH = {
  cn: SDK_SLARDAR_BATCH_PATH,
  sg: SDK_SLARDAR_BATCH_PATH,
  maliva: SDK_SLARDAR_BATCH_PATH,
  india: SDK_SLARDAR_BATCH_PATH,
  oci: SDK_SLARDAR_BATCH_PATH,
  euttp: SDK_SLARDAR_BATCH_PATH,
  ['rangers-cn']: RANGERS_BATCH_PATH,
  ['rangers-private']: RANGERS_BATCH_PATH,
  ['apm-mini-program-cn']: MINI_PROGRAM_BATCH_PATH,
}

const SLARDAR_PLUGINS_PATH = '/slardar/fe/sdk-web/plugins'

const SDK_SLARDAR_PLUGINS_PATH = {
  cn: SLARDAR_PLUGINS_PATH,
  sg: SLARDAR_PLUGINS_PATH,
  maliva: SLARDAR_PLUGINS_PATH,
  india: SLARDAR_PLUGINS_PATH,
  oci: '/obj/static-tx' + SLARDAR_PLUGINS_PATH,
  euttp: SLARDAR_PLUGINS_PATH,
}

const SDK_SLARDAR_ELECTRON_CRASH_DOMAIN = SDK_DOMAIN

const SDK_SLARDAR_ELECTRON_CRASH_PATH = '/log/sentry/v2/api/slardar/crash/'

module.exports = {
  CDN_HOST,
  SLARDAR_WEB_CDN_HOST,
  DOMAIN_HOST,
  CDN_PATH,
  REPORT_BATCH_PATH,
  SDK_DOMAIN,
  SDK_BATCH_PATH,
  SDK_SLARDAR_PLUGINS_PATH,
  LITE_CDN_PATH,
  SDK_SLARDAR_ELECTRON_CRASH_DOMAIN,
  SDK_SLARDAR_ELECTRON_CRASH_PATH,
}
